<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>请假申请信息列表</title>
    <link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/css/tip.css}"/>
    <script type="text/javascript" th:src="@{/js/androidwheel/androidwheel.js}"></script>
    <script type="text/javascript" th:src="@{/js/layer/tip.js}"></script>
</head>
<body class="no-skin">
<div th:replace="common/top"/>
<div class="main-container ace-save-state" id="main-container">
    <div th:replace="common/menu"/>
    <div class="main-content">
        <div class="main-content-inner">
            <div th:replace="common/title"/>
            <div class="page-content">
                <div th:replace="common/skin"/>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <h3 class="header smaller lighter blue"><i class="fa fa-list" aria-hidden="true"></i>请假申请信息列表
                        </h3>
                        <form id="form" name="form" th:action="@{/leaveInfo/getAll}" th:method="post"
                              th:object="${leaveInfoForm}">
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span4">
                                    <a class="btn btn-info" shiro:hasPermission="/leaveInfo/add"
                                       th:href="@{/leaveInfo/add}"><i class="fa fa-plus"
                                                                        aria-hidden="true"></i>添加</a>
                                    <button type="button" shiro:hasPermission="/leaveInfo/deleteAll"
                                            class="btn btn-danger"
                                            th:onclick="'deleteAll(\'/leaveInfo/deleteAll\');'"><i
                                            class="fa fa-times" aria-hidden="true"></i>删除
                                    </button>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span3">
                                            <span class="input_text">名称:</span>
                                        </div>
                                        <div class="span9">
                                            <input type="text" name="name" id="name" class="input_fix"
                                                   placeholder="根据名称查询" th:value="*{name}" maxlength="50"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span5">
                                            <span class="input_text">请假类型:</span>
                                        </div>
                                        <div class="span7">
                                            <select th:field="*{type}" id="type" name="type" class="input_fix">
                                                <option value="">全部</option>
                                                <option th:each="type : ${T(xyz.ibenben.zhongdian.system.entity.enums.LeaveTypeEnum).values()}"
                                                        th:value="${type}" th:text="${type.text}"></option>
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span5">
                                            <span class="input_text">请假原因:</span>
                                        </div>
                                        <div class="span7">
                                            <input type="text" name="reason" id="reason" class="input_fix"
                                                   placeholder="根据请假原因查询" th:value="*{reason}" maxlength="50"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <button class="btn btn-info" style="float: right;" type="button"
                                            onclick="pagechange(1);"><i class="fa fa-search"
                                                                        aria-hidden="true"></i>查询
                                    </button>
                                </div>
                            </div>
                            <table class="table">
                                <thead>
                                <tr>
                                    <td class="center" style="width:80px;"><label><a href="javascript:void(0);"
                                                                                     th:onclick="'selectAll(this)'">全/不选</a></label>
                                    </td>
                                    <td>请假申请名称</td>
                                    <td class="hidden-480">请假天数</td>
                                    <td class="hidden-480">请假类型</td>
                                    <td class="hidden-480">请假原因</td>
                                    <td>操作</td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="leave: ${pi.records}">
                                    <td class="center"><label><input type="checkbox" name="selectIds"
                                                                     th:value="${leave.id}"/><span
                                            class="lbl">&nbsp;</span></label></td>
                                    <td th:text="${leave.name}">doudou</td>
                                    <td class="hidden-480" th:text="${leave.days}">1-1-1-1</td>
                                    <td class="hidden-480" th:text="${leave.type.text}">70</td>
                                    <td class="hidden-480" th:text="${leave.reason}">70</td>
                                    <td>
                                        <a href="#" shiro:hasPermission="/leaveInfo/edit"
                                           class="btn btn-warning btn-minier"
                                           th:href="@{'/leaveInfo/edit?id=' + ${leave.id}}" th:text="修改">修改</a>
                                        <a href="#" shiro:hasPermission="/leaveInfo/delete"
                                           class="btn btn-danger btn-minier"
                                           th:href="@{'/leaveInfo/delete?id=' + ${leave.id}}" th:text="删除">删除</a>
                                        <a href="#" shiro:hasPermission="/leaveInfo/view"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/leaveInfo/view?id=' + ${leave.id}}"
                                           th:text="查看详情">查看详情</a>
                                    </td>
                                </tr>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="6">
                                        <div class="row-fluid" th:replace="common/page"/>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div th:replace="common/footer"/>
</div><!-- /.main-container -->
<div th:replace="common/buttom"/>
<div th:replace="common/layer"/>
</body>
</html>
